const listDemoFetch = async function (page = 1, limit = 10) {
  const url = `https://cnodejs.org/api/v1/topics?limit=${limit}&page=${page}`
  return new Promise(function (resolve, reject) {
    fetch(url)
      .then(res => res.json())
      .then(res => { resolve(res) })
      .catch(err => { reject(err) })
  })
}

export default listDemoFetch
